package com.stox.client.embedded;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.stox.client.BarClient;
import com.stox.manager.BarManager;
import com.stox.model.Bar;

@Component
public class EmbeddedBarClient implements BarClient {

	@Autowired
	private BarManager barManager;
	
	public List<Bar> findByScripCode(String scripCode) {
		return barManager.findByScripCode(scripCode);
	}

	public List<Bar> findByScripCode(String scripCode, Date start) {
		return barManager.findByScripCode(scripCode, start);
	}

	public List<Bar> findByScripCode(String scripCode, Date start, Date end) {
		return barManager.findByScripCode(scripCode, start, end);
	}
	
	public List<Bar> findByScripCode(String scripCode, int count) {
		return barManager.findByScripCode(scripCode, count);
	}

}
